import request from '@/utils/request'

// 根据id查询记录
export const getSecurityById = (id) =>
  request({
    url: `/sys/security/${id}`,
    method: 'get'
  })

// 分页查询
export const listSecurityPage = (search) =>
  request({
    url: '/sys/security/list',
    method: 'post',
    data: search
  })

// 查询所有记录
export const listSecurityAll = (search) =>
  request({
    url: '/sys/security/listAll',
    method: 'post',
    data: search
  })

// 保存/更新记录
export const saveSecurity = (security) =>
  request({
    url: '/sys/security/save',
    method: 'post',
    data: security
  })

export const initSecurity = (securityVo) =>
  request({
    url: '/sys/security/init',
    method: 'post',
    data: securityVo
  })

export const deleteSecurity = (security) =>
  request({
    url: '/sys/security/delete',
    method: 'post',
    data: security
  })

// 批量保存/更新记录
export const bulkInsertSecurity = (securitys) =>
  request({
    url: '/sys/security/bulkInsert',
    method: 'post',
    data: securitys
  })

// 批量更新记录
export const bulkUpdateSecurity = (securitys) =>
  request({
    url: '/sys/security/bulkUpdate',
    method: 'post',
    data: securitys
  })

// 批量删除记录
export const bulkDeleteSecurity = (securitys) =>
  request({
    url: '/sys/security/bulkDelete',
    method: 'post',
    data: securitys
  }) 